<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.ImageAnimation类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_image_animation.html">ImageAnimation</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_image_animation-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.ImageAnimation类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.ImageAnimation 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_image_animation.png" usemap="#awtk.ImageAnimation_map" alt=""/>
  <map id="awtk.ImageAnimation_map" name="awtk.ImageAnimation_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a4e071a4c697910183fba431dcffa7a27"><td class="memItemLeft" align="right" valign="top"><a id="a4e071a4c697910183fba431dcffa7a27"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ImageAnimation</b> (long nativeObj)</td></tr>
<tr class="separator:a4e071a4c697910183fba431dcffa7a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30769cb676c89a9ccf6eae088bb98e66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a30769cb676c89a9ccf6eae088bb98e66">setLoop</a> (boolean loop)</td></tr>
<tr class="separator:a30769cb676c89a9ccf6eae088bb98e66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a999426c423ad2be9782285b48c38bf9a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a999426c423ad2be9782285b48c38bf9a">setImage</a> (String image)</td></tr>
<tr class="separator:a999426c423ad2be9782285b48c38bf9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69eff98f927253c497f1b335ee8fa3b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a69eff98f927253c497f1b335ee8fa3b5">setInterval</a> (int interval)</td></tr>
<tr class="separator:a69eff98f927253c497f1b335ee8fa3b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35a3351b66a71e0b1031e3138564f2bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a35a3351b66a71e0b1031e3138564f2bc">setDelay</a> (int delay)</td></tr>
<tr class="separator:a35a3351b66a71e0b1031e3138564f2bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ca3edc8ae98955bc8da9777c7b5d6be"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a0ca3edc8ae98955bc8da9777c7b5d6be">setAutoPlay</a> (boolean auto_play)</td></tr>
<tr class="separator:a0ca3edc8ae98955bc8da9777c7b5d6be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abafda3eb9bf8c8c80722399184c99882"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#abafda3eb9bf8c8c80722399184c99882">setSequence</a> (String sequence)</td></tr>
<tr class="separator:abafda3eb9bf8c8c80722399184c99882"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8d830159cb305c3a75e7efac0ce4ce9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#aa8d830159cb305c3a75e7efac0ce4ce9">setRangeSequence</a> (int start_index, int end_index)</td></tr>
<tr class="separator:aa8d830159cb305c3a75e7efac0ce4ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1bae11e71d339563b76d1016ecda3f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#ab1bae11e71d339563b76d1016ecda3f9">play</a> ()</td></tr>
<tr class="separator:ab1bae11e71d339563b76d1016ecda3f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01662d88b5a659def6635214547b19d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a01662d88b5a659def6635214547b19d5">stop</a> ()</td></tr>
<tr class="separator:a01662d88b5a659def6635214547b19d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e4e08af5e0c18fb78bdd4250658f18b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a3e4e08af5e0c18fb78bdd4250658f18b">pause</a> ()</td></tr>
<tr class="separator:a3e4e08af5e0c18fb78bdd4250658f18b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c9a1183b33bda1ebcd8e7e64a51c44a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a9c9a1183b33bda1ebcd8e7e64a51c44a">next</a> ()</td></tr>
<tr class="separator:a9c9a1183b33bda1ebcd8e7e64a51c44a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9611d47cff6267517519fae5c54ed497"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a9611d47cff6267517519fae5c54ed497">setFormat</a> (String format)</td></tr>
<tr class="separator:a9611d47cff6267517519fae5c54ed497"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a527270a181957fccf06e53c2ca0c2b64"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a527270a181957fccf06e53c2ca0c2b64">setUnloadAfterPaint</a> (boolean unload_after_paint)</td></tr>
<tr class="separator:a527270a181957fccf06e53c2ca0c2b64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86082af9aa0d56334270df26bcb64a6b"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a86082af9aa0d56334270df26bcb64a6b">getImage</a> ()</td></tr>
<tr class="separator:a86082af9aa0d56334270df26bcb64a6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10cd2db8d370429bbe65104c01151591"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a10cd2db8d370429bbe65104c01151591">getSequence</a> ()</td></tr>
<tr class="separator:a10cd2db8d370429bbe65104c01151591"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ffb37410cfa9bdeb6a6dd67839f625c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a2ffb37410cfa9bdeb6a6dd67839f625c">getStartIndex</a> ()</td></tr>
<tr class="separator:a2ffb37410cfa9bdeb6a6dd67839f625c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0e3d78379d5981be52bc95fa7534f39"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#ab0e3d78379d5981be52bc95fa7534f39">getEndIndex</a> ()</td></tr>
<tr class="separator:ab0e3d78379d5981be52bc95fa7534f39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9023d758413326de4a5ec402eebe3ba4"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a9023d758413326de4a5ec402eebe3ba4">getLoop</a> ()</td></tr>
<tr class="separator:a9023d758413326de4a5ec402eebe3ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82df39cc679d29483ff741e2657f65ec"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a82df39cc679d29483ff741e2657f65ec">getAutoPlay</a> ()</td></tr>
<tr class="separator:a82df39cc679d29483ff741e2657f65ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1641f64040a4c2a47701a55f8c1c9ce0"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a1641f64040a4c2a47701a55f8c1c9ce0">getUnloadAfterPaint</a> ()</td></tr>
<tr class="separator:a1641f64040a4c2a47701a55f8c1c9ce0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b748a556e7a661bae7e2963d29cc844"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a7b748a556e7a661bae7e2963d29cc844">getFormat</a> ()</td></tr>
<tr class="separator:a7b748a556e7a661bae7e2963d29cc844"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa89d89b2fee3f73644c32944547e89c9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#aa89d89b2fee3f73644c32944547e89c9">getInterval</a> ()</td></tr>
<tr class="separator:aa89d89b2fee3f73644c32944547e89c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a359e264fe9cbc8ef42229fbd5ece7c27"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a359e264fe9cbc8ef42229fbd5ece7c27">getDelay</a> ()</td></tr>
<tr class="separator:a359e264fe9cbc8ef42229fbd5ece7c27"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:abe2caaf8ad7fe7037403e0359ce565a4"><td class="memItemLeft" align="right" valign="top"><a id="abe2caaf8ad7fe7037403e0359ce565a4"></a>
static <a class="el" href="classawtk_1_1_image_animation.html">ImageAnimation</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:abe2caaf8ad7fe7037403e0359ce565a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac57f74f5ec167d292ac2bc8b27dbfa3b"><td class="memItemLeft" align="right" valign="top">static Widget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#ac57f74f5ec167d292ac2bc8b27dbfa3b">create</a> (Widget parent, int x, int y, int w, int h)</td></tr>
<tr class="separator:ac57f74f5ec167d292ac2bc8b27dbfa3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70f5fb097e4d5784597b8c2e8a377062"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_image_animation.html">ImageAnimation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_animation.html#a70f5fb097e4d5784597b8c2e8a377062">cast</a> (Widget widget)</td></tr>
<tr class="separator:a70f5fb097e4d5784597b8c2e8a377062"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ac34e4548fd9e0e506c7b0e4e277102bb"><td class="memItemLeft" align="right" valign="top"><a id="ac34e4548fd9e0e506c7b0e4e277102bb"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:ac34e4548fd9e0e506c7b0e4e277102bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>图片动画控件，指定一个图片前缀，依次显示指定序列的图片，从而形成动画效果。</p>
<p>图片序列可以用sequence指定，也可以用start_index和end_index指定一个范围。</p>
<p>image_animation_t是widget的子类控件，widget_t的函数均适用于image_animation_t控件。</p>
<p>在xml中使用"image\_animation"标签创建图片动画控件。如：</p>
<div class="fragment"><div class="line">&lt;<span class="keywordtype">image_animation</span> <span class="keyword">image</span>=<span class="stringliteral">&quot;ani&quot;</span> <span class="keyword">start_index</span>=<span class="stringliteral">&quot;1&quot;</span> <span class="keyword">end_index</span>=<span class="stringliteral">&quot;9&quot;</span> <span class="keyword">auto_play</span>=<span class="stringliteral">&quot;true&quot;</span> <span class="keyword">interval</span>=<span class="stringliteral">&quot;50&quot;</span></div><div class="line"><span class="keyword">delay</span>=<span class="stringliteral">&quot;100&quot;</span>/&gt;</div></div><!-- fragment --><p>更多用法请参考： <a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/image_animation.xml">image_animation.xml</a></p>
<p>在c代码中使用函数image_animation_create创建图片动画控件。如：</p>
<p>完整示例请参考： <a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/image_animation.c">image_animation demo</a></p>
<p>可用通过style来设置控件的显示风格，如背景颜色和边框等等，不过一般情况并不需要。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a70f5fb097e4d5784597b8c2e8a377062"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70f5fb097e4d5784597b8c2e8a377062">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_image_animation.html">ImageAnimation</a> awtk.ImageAnimation.cast </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为image_animation对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>image_animation对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>image_animation对象。 </dd></dl>

</div>
</div>
<a id="ac57f74f5ec167d292ac2bc8b27dbfa3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac57f74f5ec167d292ac2bc8b27dbfa3b">&#9670;&nbsp;</a></span>create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Widget awtk.ImageAnimation.create </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建image_animation对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="a82df39cc679d29483ff741e2657f65ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82df39cc679d29483ff741e2657f65ec">&#9670;&nbsp;</a></span>getAutoPlay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.ImageAnimation.getAutoPlay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>是否自动播放。 </p>

</div>
</div>
<a id="a359e264fe9cbc8ef42229fbd5ece7c27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a359e264fe9cbc8ef42229fbd5ece7c27">&#9670;&nbsp;</a></span>getDelay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.ImageAnimation.getDelay </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>自动播放时延迟播放的时间(毫秒)。 </p>

</div>
</div>
<a id="ab0e3d78379d5981be52bc95fa7534f39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0e3d78379d5981be52bc95fa7534f39">&#9670;&nbsp;</a></span>getEndIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.ImageAnimation.getEndIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>图片结束序数。 </p>

</div>
</div>
<a id="a7b748a556e7a661bae7e2963d29cc844"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b748a556e7a661bae7e2963d29cc844">&#9670;&nbsp;</a></span>getFormat()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.ImageAnimation.getFormat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>索引到图片名转换时的格式，缺省为"%s%d"。 </p>

</div>
</div>
<a id="a86082af9aa0d56334270df26bcb64a6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86082af9aa0d56334270df26bcb64a6b">&#9670;&nbsp;</a></span>getImage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.ImageAnimation.getImage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>图片名称的前缀。 </p>

</div>
</div>
<a id="aa89d89b2fee3f73644c32944547e89c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa89d89b2fee3f73644c32944547e89c9">&#9670;&nbsp;</a></span>getInterval()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.ImageAnimation.getInterval </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>每张图片播放的时间(毫秒)。 </p>

</div>
</div>
<a id="a9023d758413326de4a5ec402eebe3ba4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9023d758413326de4a5ec402eebe3ba4">&#9670;&nbsp;</a></span>getLoop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.ImageAnimation.getLoop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>是否循环播放。 </p>

</div>
</div>
<a id="a10cd2db8d370429bbe65104c01151591"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10cd2db8d370429bbe65104c01151591">&#9670;&nbsp;</a></span>getSequence()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.ImageAnimation.getSequence </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>播放的序列，字符可选值为数字和英文大小写字母，字符可以重复。如：0123456789或者123123abcd。 </p>

</div>
</div>
<a id="a2ffb37410cfa9bdeb6a6dd67839f625c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ffb37410cfa9bdeb6a6dd67839f625c">&#9670;&nbsp;</a></span>getStartIndex()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int awtk.ImageAnimation.getStartIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>图片起始序数。 </p>

</div>
</div>
<a id="a1641f64040a4c2a47701a55f8c1c9ce0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1641f64040a4c2a47701a55f8c1c9ce0">&#9670;&nbsp;</a></span>getUnloadAfterPaint()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.ImageAnimation.getUnloadAfterPaint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>绘制完成后unload图片，以释放内存空间。 </p>

</div>
</div>
<a id="a9c9a1183b33bda1ebcd8e7e64a51c44a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c9a1183b33bda1ebcd8e7e64a51c44a">&#9670;&nbsp;</a></span>next()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.next </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>手动切换到下一张图片。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a3e4e08af5e0c18fb78bdd4250658f18b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e4e08af5e0c18fb78bdd4250658f18b">&#9670;&nbsp;</a></span>pause()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.pause </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>暂停。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ab1bae11e71d339563b76d1016ecda3f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1bae11e71d339563b76d1016ecda3f9">&#9670;&nbsp;</a></span>play()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.play </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>播放。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a0ca3edc8ae98955bc8da9777c7b5d6be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ca3edc8ae98955bc8da9777c7b5d6be">&#9670;&nbsp;</a></span>setAutoPlay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setAutoPlay </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>auto_play</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置是否自动播放。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">auto_play</td><td>是否自动播放。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a35a3351b66a71e0b1031e3138564f2bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35a3351b66a71e0b1031e3138564f2bc">&#9670;&nbsp;</a></span>setDelay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setDelay </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>delay</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置延迟播放时间(仅适用于自动播放)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">delay</td><td>延迟播放时间(毫秒)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a9611d47cff6267517519fae5c54ed497"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9611d47cff6267517519fae5c54ed497">&#9670;&nbsp;</a></span>setFormat()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setFormat </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>format</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置生成图片名的格式。</p>
<p>XXX:生成图片名时，第一个参数是图片名前缀，第二个是序数，只能在此前提下设置格式。</p>
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* format = image_animation-&gt;format ? image_animation-&gt;format : <span class="stringliteral">&quot;%s%d&quot;</span>;</div><div class="line">tk_snprintf(name, TK_NAME_LEN, format, image_animation-&gt;image, image_animation-&gt;index);</div></div><!-- fragment --><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">format</td><td>格式。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a999426c423ad2be9782285b48c38bf9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a999426c423ad2be9782285b48c38bf9a">&#9670;&nbsp;</a></span>setImage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setImage </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>image</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置图片前缀。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>图片前缀。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a69eff98f927253c497f1b335ee8fa3b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69eff98f927253c497f1b335ee8fa3b5">&#9670;&nbsp;</a></span>setInterval()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setInterval </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>interval</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置播放间隔时间。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">interval</td><td>间隔时间(毫秒)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a30769cb676c89a9ccf6eae088bb98e66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30769cb676c89a9ccf6eae088bb98e66">&#9670;&nbsp;</a></span>setLoop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setLoop </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>loop</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置是否循环播放。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">loop</td><td>是否循环播放。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="aa8d830159cb305c3a75e7efac0ce4ce9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8d830159cb305c3a75e7efac0ce4ce9">&#9670;&nbsp;</a></span>setRangeSequence()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setRangeSequence </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end_index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置播放序列。比如image为"fire"，start_index为0, end_index为99, 将依次播放"fire0", ..., "fire99"。</p>
<p>若指定的图片不存在，则重复上一张图片。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">start_index</td><td>图片起始序数。 </td></tr>
    <tr><td class="paramname">end_index</td><td>图片结束序数。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="abafda3eb9bf8c8c80722399184c99882"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abafda3eb9bf8c8c80722399184c99882">&#9670;&nbsp;</a></span>setSequence()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setSequence </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>sequence</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置播放序列。比如image为"fire"，sequence为"12223", 将依次播放"fire1", "fire2", "fire2", "fire2", "fire3"。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sequence</td><td>播放序列。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a527270a181957fccf06e53c2ca0c2b64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a527270a181957fccf06e53c2ca0c2b64">&#9670;&nbsp;</a></span>setUnloadAfterPaint()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.setUnloadAfterPaint </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>unload_after_paint</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置绘制完成后unload图片，以释放内存空间。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">unload_after_paint</td><td>是否绘制完成后unload图片。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a01662d88b5a659def6635214547b19d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a01662d88b5a659def6635214547b19d5">&#9670;&nbsp;</a></span>stop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageAnimation.stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>停止(并重置index为-1)。</p>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/ImageAnimation.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
